package com.zyb;

import com.zyb.config.SpringConfig;
import com.zyb.domain.Account;
import com.zyb.service.AccountService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AppForMybatis {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx =
                new AnnotationConfigApplicationContext(SpringConfig.class);
        AccountService accountService = ctx.getBean(AccountService.class);
        Account ac = accountService.findById(1);
        System.out.println(ac);
    }
}
